Skip to content

Conversation

@lantoli
Copy link
Member

@lantoli lantoli commented Nov 6, 2025

Update Python publishing process. It can't be tested until a real publish is done.

More info here.

Jira ticket: CLOUDP-357238

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update

Required Checklist:

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • I have tested the CDK constructor in a CFN stack. See TESTING.md
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@lantoli lantoli marked this pull request as ready for review November 6, 2025 07:57
@lantoli lantoli requested a review from a team as a code owner November 6, 2025 07:57
Copilot AI review requested due to automatic review settings November 6, 2025 07:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Python package publishing process to use PyPI's Trusted Publishing mechanism instead of username/password authentication. This improves security by eliminating the need to store PyPI credentials as secrets.

Key changes:

  • Adds id-token: write permission required for OIDC-based authentication
  • Replaces manual twine upload with the official PyPA GitHub Action
  • Removes deprecated username/password credentials from the workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: |
pip install twine
twine upload dist/python/*.whl dist/python/*.tar.gz
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: Did we have to configure anything from PiPy side? (https://docs.pypi.org/trusted-publishers/adding-a-publisher/)

Copy link
Member Author

@lantoli lantoli Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, enable Trusted Publishing with the repo name and release.yml GH file

@lantoli lantoli merged commit 475ad13 into main Nov 6, 2025
23 checks passed
@lantoli lantoli deleted the CLOUDP-357238_python branch November 6, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants